package com.xianye.erp.service.order.impl;

import java.util.List;

import javax.annotation.Resource;

import com.xianye.erp.dao.base.DaoSupport;
import com.xianye.erp.service.order.OrderManager;
import com.xianye.erp.util.PageData;
import org.springframework.stereotype.Service;



/** 
 * 说明： 
 * 创建时间：2016-04-08
 * @version
 */
@Service("orderService")
public class OrderService implements OrderManager {

	@Resource(name = "daoSupport")
	private DaoSupport dao;
	@Override
	public void save(PageData pd) throws Exception {
		dao.save("OrderMapper.save", pd);
	}
	@Override
	public void batchSave(List<PageData> pds) throws Exception {
		dao.save("OrderMapper.batchSave", pds);
	}
	public void batchUpdate(List<PageData> pds)throws Exception{
		dao.batchUpdate("OrderMapper.edit", pds);
	}
	
	@Override
	public void save_buyerinfo(PageData pd) throws Exception {
		dao.save("OrderBuyerinfoMapper.save", pd);
	}
	@Override
	public void batchSave_buyerinfo(List<PageData> pds)throws Exception{
		dao.save("OrderBuyerinfoMapper.batchSave", pds);
	}
	@Override
	public void delete_buyerinfo(PageData pd) throws Exception {
		dao.delete("OrderBuyerinfoMapper.delete", pd);
	}
	@Override
	public void BatchDelete_buyerinfo(List<String> pds)throws Exception{
		dao.batchDelete("OrderBuyerinfoMapper.batchDelete", pds);
	}
	
	
	@Override
	public void save_child(PageData pd) throws Exception {
		dao.save("OrderChildMapper.save", pd);
	}
	@Override
	public void batchSave_child(List<PageData> pds)throws Exception{
		dao.save("OrderChildMapper.batchSave", pds);
	}
	@Override
	public void delete_child(PageData pd) throws Exception {
		dao.delete("OrderChildMapper.delete", pd);
		
	}
	@Override
	public void batchDelete_child(List<String> pds)throws Exception{
		dao.batchDelete("OrderChildMapper.batchDelete", pds);
	}
	
	
	@Override
	public void save_issueinfo(PageData pd) throws Exception {
		dao.save("OrderIssueinfoMapper.save", pd);
	}
	@Override
	public void delete_issueinfo(PageData pd) throws Exception {
		dao.delete("OrderIssueinfoMapper.delete", pd);
	}
	
	
	@Override
	public void save_logisticinfolist(PageData pd) throws Exception {
		dao.save("OrderLogisticinfofoMapper.save", pd);
	}
	@Override
	public void batchSave_logisticinfolist(List<PageData> pds)throws Exception{
		dao.save("OrderLogisticinfofoMapper.batchSave", pds);
	}
	@Override
	public void delete_logisticinfolist(PageData pd) throws Exception {
		dao.delete("OrderLogisticinfofoMapper.delete", pd);
	}
	@Override
	public void batchDelete_logisticinfolist(List<String> pds)throws Exception{
		dao.batchDelete("OrderLogisticinfofoMapper.batchDelete", pds);
	}
	
	
	
	
	@Override
	public void save_msglist(PageData pd) throws Exception {
		dao.save("OrderMsglistMapper.save", pd);
		
	}
	@Override
	public void delete_msglist(PageData pd) throws Exception {
		dao.delete("OrderMsglistMapper.delete", pd);
	}
	@Override
	public void batchSave_msglist(List<PageData> pds)throws Exception{
		dao.save("OrderMsglistMapper.batchSave", pds);
	}
	@Override
	public void batchDelete_msglist(List<String> pds)throws Exception{
		dao.batchDelete("OrderMsglistMapper.batchDelete", pds);
	}
	
	@Override
	public void save_product(PageData pd) throws Exception {
		dao.save("OrderProductMapper.save", pd);
	}
	@Override
	public void delete_product(PageData pd) throws Exception {
		dao.delete("OrderProductMapper.delete", pd);
	}
	@Override
	public void batchSave_product(List<PageData> pds)throws Exception{
//		for (int i=0;i<pds.size();i++){
//			System.out.println("数据"+pds.get(i));
//		}
		dao.save("OrderProductMapper.batchSave", pds);
	}
	@Override
	public void batchDelete_product(List<String> pds)throws Exception{
		dao.batchDelete("OrderProductMapper.batchDelete", pds);
	}
	
	@Override
	public void save_receiptaddress(PageData pd) throws Exception {
		dao.save("OrderReceiptaddressMapper.save", pd);
	}
	@Override
	public void batchSave_receiptaddress(List<PageData> pds)throws Exception{
		dao.save("OrderReceiptaddressMapper.batchSave", pds);
	}
	@Override
	public void delete_receiptaddress(PageData pd) throws Exception {
		dao.delete("OrderReceiptaddressMapper.delete", pd);
	}
	@Override
	public void batchDelete_receiptaddress(List<String> pds)throws Exception{
		dao.batchDelete("OrderReceiptaddressMapper.batchDelete", pds);
	}
	
	@Override
	public void batchSave_loan(List<PageData> pds)throws Exception{
		dao.save("ChildLoanMapper.batchSave", pds);
	}
	
	
	
	@Override
	public PageData findById(PageData pd)throws Exception{
		return (PageData)dao.findForObject("OrderMapper.findById", pd);
	}
	@Override
	public PageData findByOrderId(PageData pd) throws Exception {
		return (PageData)dao.findForObject("OrderMapper.findByOrderId", pd);
	}

	@Override
	public void edit(PageData pd)throws Exception{
		dao.update("OrderMapper.edit", pd);
	}
	


	

	
	
	
}

